package controllers

import "github.com/astaxie/beego"

type JsonReturnController struct {
	beego.Controller
}

type student struct {
	Name      string `json:"stuName"`
	Age       int    `json:"age"`
	IsChinese bool   `json:"isChinese"`
}

func (this *JsonReturnController) JsonReturn() {
	stu := student{}
	stu.Age = 30
	stu.Name = "eric"
	stu.IsChinese = false
	this.Data["json"] = &stu
	this.ServeJSON()
}
